import argparse
from config.config import *
from logic.logic_test import LogicTest
from logic.logic_online import LogicOnline
from logic.logic_online_test import LogicOnlineTest
from strategy.strategy1 import Strategy1

def main():

    parser = argparse.ArgumentParser(description='交易框架')
    # parser.add_argument('action', choices=['order', 'test', 'online'], help='参数ACTION：order: 实盘交易, test: 回测, online: 实盘回测')
    args = parser.parse_args()
     
    strategy = Strategy1()
    # if args.action == 'order':
    #     handle = LogicOnline(strategy, args)
    # elif args.action == 'test':
    #     if BACKTEST_STOCK_LIST is None:
    #         parser.error("请设置回测的股票列表")
    #     handle = LogicTest(strategy, args)
    # elif args.action == 'online':
    #     handle = LogicOnlineTest(strategy, args)

    handle = LogicTest(strategy, args)
    # 运行
    handle.run()

if __name__ == '__main__':
    main()